package com.wc.fortnight_blue_bridge.Q16模拟一.A_求质因数;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    /**
     * 【问题描述】
     * 如果一个数 p 是个质数，同时又是整数 a 的约数，则 p 称为 a 的一个质因数。
     * 请问 2024 有多少个质因数。
     * 答案 ： 3
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int n;

    public static void main(String[] args) {
        n = 2024;
        int res = 0;
        for(int i = 2; i <= n; i++){
            if (n % i == 0){
                res ++;
                while (n % i == 0) n /= i;
                out.println(i);
            }
        }
        if (n > 1) {
            res ++;
            out.println(n);
        }
        out.println(res);
        out.flush();
    }
}

class FastReader{
    StringTokenizer st;
    BufferedReader br;

    FastReader(){
        br = new BufferedReader(new InputStreamReader(System.in));
    }


    String nextLine(){
        try {
            return br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    String next(){
        while (st == null || !st.hasMoreElements()){
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt(){
        return Integer.parseInt(next());
    }

    long nextLong(){
        return Long.parseLong(next());
    }

    boolean hasNext(){
        String s = null;
        while (st == null || !st.hasMoreElements()){
            s = nextLine();
            if (s == null) return false;
            st = new StringTokenizer(s);
        }
        return true;
    }
}